home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
422mods.zip
/
MORGUL15.422
< prev
next >
Wrap
Text File
|
1993-04-08
|
8KB
|
322 lines
Morgul15.mod - Improved Macro list/editor for Defaults
Morgul #1 @8315
1Sunday, 2April 34, 51993 7@ 1 46:120 7am 2EST
┌────────────────────────────────────────────────────────────────────────────┐
│ Mod Name: Morg15.Mod Mod Authors: Morgul 1@8315 │
│ Difficulty: Pretty simple! Date: April 4, 1993 @ 4 am! │
│ WWIV Version: 4.22 │
│ Files Affected: Defaults.c, Fcns.c │
│ Description: This is a MUCH better looking way of listing and editing your │
│ macros. │
└────────────────────────────────────────────────────────────────────────────┘
Actually, I saw this type of thing on another board in town at one time.
It was a similar mod, but mine is faster and cleaner, I believe. I got the
idea to write it up and publish it, since the original author wasn't (it'd been
about 5 months since I last saw it.) Anyway, thanks to Dungeon Master 1@8327
who gave me the idea.
Now, on with the mod.
<< Step 1 >> BACK UP YOUR SOURCE!
<< Step 2 >> Load up DEFAULTS.C and look for void list_macro. Immediately
above it, add the following voids:
void show_macro(void)
{
int i;
outchr(12);
ansic(7);
goxy(1,5);
outchr(201);
for (i=0;i<9;i++)
outchr(205);
outchr(203);
for (i=0;i<68;i++)
outchr(205);
outchr(187);
goxy(1,6);
outchr(186);
npr("4Control-A");
ansic(7);
outchr(186);
mpl(68);
goxy(80,6);
ansic(7);
outchr(186);
goxy(1,7);
outchr(204);
for(i=0;i<9;i++)
outchr(205);
outchr(206);
for (i=0;i<68;i++)
outchr(205);
outchr(186);
goxy(1,8);
outchr(186);
npr("4Control-D");
ansic(7);
outchr(186);
mpl(68);
goxy(80,8);
ansic(7);
outchr(186);
goxy(1,9);
outchr(204);
for(i=0;i<9;i++)
outchr(205);
outchr(206);
for (i=0;i<68;i++)
outchr(205);
outchr(186);
goxy(1,10);
outchr(186);
npr("4Control-F");
ansic(7);
outchr(186);
mpl(68);
goxy(80,10);
ansic(7);
outchr(186);
goxy(1,11);
outchr(200);
for(i=0;i<9;i++)
outchr(205);
outchr(202);
for (i=0;i<68;i++)
outchr(205);
outchr(188);
goxy(12,6);
ansic(4);
list_macro(&(thisuser.macros[2][0]));
goxy(12,8);
ansic(4);
list_macro(&(thisuser.macros[0][0]));
goxy(12,10);
ansic(4);
list_macro(&(thisuser.macros[1][0]));
}
void do_macros(void)
{
char ch;
int i,done;
do {
show_macro();
goxy(1,14);
ansic(7);
outchr(201);
for (i=0;i<78;i++)
outchr(205);
outchr(187);
goxy(1,15);
outchr(186);
mpl(78);
ansic(7);
goxy(80,15);
outchr(186);
goxy(1,16);
ansic(7);
outchr(200);
for (i=0;i<78;i++)
outchr(205);
outchr(188);
goxy(2,15);
npr("4Which Macro do you want to change, A, D, or F (Q to Quit)");
goxy(60,15);
ch=onek("ADFQ");
switch (ch) {
case 'A':
make_macro(2);
done=0;
break;
case 'D':
make_macro(0);
done=0;
break;
case 'F':
make_macro(1);
done=0;
break;
case 'Q':
done=1;
goxy(1,20);
break;
}
} while ((!done) && (!hangup));
}
void make_macro(int type)
{
unsigned char tempmac[81], s[81];
unsigned char ch1;
int y1,i,done,i1,done1;
switch (type)
{
case 0:
y1=7;
i1=0;
break;
case 1:
y1=9;
i1=1;
break;
case 2:
y1=5;
i1=2;
break;
}
goxy(1,y1);
ansic(2);
outchr(201);
for (i=0;i<9;i++)
outchr(205);
outchr(203);
for (i=0;i<68;i++)
outchr(205);
outchr(187);
goxy(1,y1+1);
outchr(186);
goxy(11,y1+1);
outchr(186);
goxy(80,y1+1);
outchr(186);
goxy(1,y1+2);
outchr(200);
for (i=0;i<9;i++)
outchr(205);
outchr(202);
for (i=0;i<68;i++)
outchr(205);
outchr(188);
goxy(2,15);
mpl(78);
npr("4Please enter your macro now, Control-Z when you are done.");
goxy(12,y1+1);
mpl(68);
strcpy(s,&thisuser.macros[i1][0]);
thisuser.macros[i1][0]=0;
done1=0;
i=0;
do {
ch1=getkey();
if (ch1==26)
done1=1;
else
if (ch1==8) {
if (i>0) {
i--;
backspace();
if (tempmac[i]<32)
backspace();
}
} else {
if (ch1>=32) {
tempmac[i++]=ch1;
outchr(ch1);
} else {
tempmac[i++]=ch1;
outchr('^');
outchr(ch1+64);
}
}
if (i>=68)
done1=1;
} while ((!done1) && (!hangup));
tempmac[i]=0;
goxy(2,15);
mpl(78);
npr("4Is this what you want (Y/N)");
goxy(30,15);
if (yn()) {
strcpy(&(thisuser.macros[i1][0]),tempmac);
goxy(2,15);
mpl(78);
npr("4It's Saved!");
} else {
strcpy(&(thisuser.macros[i1][0]),s);
goxy(2,15);
mpl(78);
npr("4Throwing it out the window....");
}
ansic(0);
}
<< Step 3 >> Go down to void list_macro, and comment out the lines indicated:
void list_macro(unsigned char *s)
{
int i;
i=0;
// outchr('\"'); /* Commented out for Morgul15.Mod */
while ((i<80) && (s[i]!=0)) {
if (s[i]>=32)
outchr(s[i]);
else {
outchr('^');
outchr(s[i]+64);
}
++i;
}
// outchr('"'); /* Commented out for Morgul15.Mod */
nl();
}
<< Step 4 >> Remove completely or comment out void make_macros(). Make sure
you get make macroS, not make_macro, which you just added. make_macros comes
right after void list_macro
<< Step 5 >> Step on down to void defaults. Make the following changes to case
7
case '7':
do_macros(); /* Added for Morg15.Mod */
pausescr(); /* Added for Morg15.Mod */
// make_macros(); /* Commented out for Morg15.Mod */
break;
case '8':
<< Step 6 >> Save Defaults.c and load up FCNS.H Search for void list_macro and
insert these right above it:
void show_macro(void);
void do_macros(void);
void make_macro(int type);
And be sure to delete void make_macros(void) directly underneath void
list_macro
<< Step 7 >> Save and compile! That's all there is to it. It creates an
impressive looking macro section in defaults...you've got to see it to believe
it. The only drawback to this mod is that it shortens the length of the macro
to 68 characters...unfortunate, but really unavoidible to have it fit in the
boxes. I'm working on a way around that, however.
Standard Disclaimer. It works here. Don't screw up, and it'll work there.
I hope you like it. If you want to see it in operation first, feel free to
call The Trading Post [SOUTH] and check it out. I'm ASV, so you'll have
full access on your first call. (shameless plug)
If you do use this mod, please drop me a line at 1@8315
WWIVNet/Icenet/Solarnet/Woofnet and let me know.
Oh yeah, revenge is sweet. Also drop a note to 1@1100 and say "Nyah"
Morgul
1
27─────────────═════════════ 1T2he 1T2rading 1P2ost 7[1SOUTH7] ═════════════──────────────0
31Columbia, S.C. 2- 5(803) 731-0690 2-3 USR DS 16.8 2- 1WOMRable7 2- 3ASV 2- 7Icenet Support0
47 5WWIVNet7/3AdventNet7/4ICENet7/2SOLARNet 1@28315 6-1 FidoNet 21:376/126 0
5